package cn.edu.sdjzu.xg.bysj.domain;

import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

@ToString
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class User implements Comparable<User>, Serializable {
	private Integer id;
	private String username;
	private String password;
	private LocalDateTime loginTime;
	private Actor actor;


	public User(Integer id, String username, String password) {
		this.id = id;
		this.username = username;
		this.password = password;
	}
	public User( String username, String password,LocalDateTime loginTime,Actor actor) {
		this.id = id;
		this.username = username;
		this.password = password;
		this.loginTime=loginTime;
		this.actor =actor;
	}
	@Override
	public int compareTo(User o) {
		// TODO Auto-generated method stub
		return this.id - o.id;
	}

}